package com.jihu.design.behavioral.visitor;

/**
 * @author jihu
 * @date 2021/10/13
 */
public class UpdatePackage implements Vistor {

    private String ext;


    public  UpdatePackage(String ext){
        this.ext = ext;
    }

    @Override
    public void visitCPU(CPU cpu) {
        cpu.command += ">>>> "+ext;
    }

    @Override
    public void visitDisk(Disk disk) {
        disk.command += ">>>> "+ext;;
    }

    @Override
    public void visitFoot(Foot foot) {
        foot.command += ">>>> "+ext;;
    }
}
